//
//  BJNavigationViewController.m
//  
//
//  Created by lishen on 2023/3/1.
//

#import "BJNavigationViewController.h"
#import "BJPublishViewController.h"
@interface BJNavigationViewController ()

@end

@implementation BJNavigationViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    [[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(dealHangUp) name:@"clickPushItem" object:nil];//对方挂断通知

    // Do any additional setup after loading the view.
}

-(void)dealHangUp{
    BJPublishViewController *vc = [[BJPublishViewController alloc]init];
    vc.modalPresentationStyle = UIModalPresentationFullScreen;
    [self presentViewController:vc animated:YES completion:nil];
}
/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/
- (void)pushViewController:(UIViewController *)viewController animated:(BOOL)animated {
    if (self.viewControllers.count >= 1) {
        viewController.hidesBottomBarWhenPushed = YES;
    }
    [super pushViewController:viewController animated:YES];
}
- (void)dealloc{
    [[NSNotificationCenter defaultCenter]removeObserver:self];
}
@end
